using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_DataSet_ABRecord_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.DataSet.ABRecord);

            field = type.GetField("time", flag);
            app.RegisterCLRFieldGetter(field, get_time_0);
            app.RegisterCLRFieldSetter(field, set_time_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_time_0, AssignFromStack_time_0);
            field = type.GetField("bundles", flag);
            app.RegisterCLRFieldGetter(field, get_bundles_1);
            app.RegisterCLRFieldSetter(field, set_bundles_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_bundles_1, AssignFromStack_bundles_1);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.DataSet.ABRecord());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.DataSet.ABRecord[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_time_0(ref object o)
        {
            return ((huqiang.DataSet.ABRecord)o).time;
        }

        static StackObject* CopyToStack_time_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.DataSet.ABRecord)o).time;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_time_0(ref object o, object v)
        {
            ((huqiang.DataSet.ABRecord)o).time = (System.Single)v;
        }

        static StackObject* AssignFromStack_time_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @time = *(float*)&ptr_of_this_method->Value;
            ((huqiang.DataSet.ABRecord)o).time = @time;
            return ptr_of_this_method;
        }

        static object get_bundles_1(ref object o)
        {
            return ((huqiang.DataSet.ABRecord)o).bundles;
        }

        static StackObject* CopyToStack_bundles_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.DataSet.ABRecord)o).bundles;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_bundles_1(ref object o, object v)
        {
            ((huqiang.DataSet.ABRecord)o).bundles = (System.String[])v;
        }

        static StackObject* AssignFromStack_bundles_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String[] @bundles = (System.String[])typeof(System.String[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.DataSet.ABRecord)o).bundles = @bundles;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.DataSet.ABRecord();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
